﻿<?php
if (!defined('ROOT_PATH')) {
    exit();
}

define ('AUTH', 0);

$passwd = array(
    'go'         => 'go',
);
if (AUTH) {
    if (!isset($_SERVER['PHP_AUTH_USER']) ||
        !isset($_SERVER['PHP_AUTH_PW']) ||
        !isset($passwd[$_SERVER['PHP_AUTH_USER']]) ||
        $passwd[$_SERVER['PHP_AUTH_USER']] != $_SERVER['PHP_AUTH_PW']
    ) {
        header('WWW-Authenticate: Basic realm="Project Team: contact : Ngannv"');
        header('HTTP/1.0 401 Unauthorized');
        $login = false;
    } else {
        $login = true;
    }
    if (!$login) {
        echo "<h1>Hị hị...!</h1>";
        exit;
    }
}
?>